import resolve from "resolve"
import request from "./request"

// export const GetHomeApi = ()=>request.get("/index/index")
// 登录接口


// Promise<resolve的数据类型>
// 登录接口
export const LoginApi = (params:logini):Ptype<string> => request.post("/1024/login",params)
// 注册接口
export const RegApi = (params:regi):Ptype<Object> => request.post("/1024/register",params)
// 首页接口 6666

export const GetHomeApi=():Ptype<IHomeApi>=>request.get("/6666")
// 快速刷题
export const GetFastApi=():Ptype<IFastApi>=>request.get("/4698")


export const GetTestCategory=(actionCode:string,testType:string="all"):Ptype<Itest[]>=>request.get(`/1314/${actionCode}/${testType}`)

//获取题目


export const GetPractice = (params:IPractice):Ptype<IQuestion[]>=>request.post("/1314",params)

// 提交答题内容

export const Getput = (params:any):Ptype<IQuestion[]>=>request.put("/1314",params)


// 侧边栏切换学科
export const Qie =()=>request.get("/6666/field")

// 侧边栏切换学科
export const Qie2 =(actionCode:string)=>request.get(`/6666/${actionCode}`)

export const Qie3 =(actionCode:string)=>request.post(`/6666/${actionCode}`)